﻿-- Ajout d'une contrainte d'unicité sur la table NodePropertyValue
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[medianamik_NodePropertyValue]') AND name = N'IX_medianamik_NodePropertyValue_UNIQUE')
BEGIN
	CREATE UNIQUE NONCLUSTERED INDEX [IX_medianamik_NodePropertyValue_UNIQUE] ON [dbo].[medianamik_NodePropertyValue] 
(
	[NodeId] ASC,
	[PropertyId] ASC,
	[Revision] ASC,
	[CultureName] ASC
)WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
END

-- Correction au niveau du DataType 115D0AEB-B145-4F4C-B5C5-56D6C4216F42 (double -> float)

UPDATE medianamik_DataType
SET DataTypeSQLName = 'float'
where DataTypeId = '115D0AEB-B145-4F4C-B5C5-56D6C4216F42'


